// 创建服务器的入口文件
const Koa = require('koa')
const app = new Koa()
// 绑定中间件
const respDurationMiddleWare = require('./middleware/koa_response_duration')
app.use(respDurationMiddleWare)
const respHeaderMiddleWare = require('./middleware/koa_response_header')
app.use(respHeaderMiddleWare)
const respDataMiddleWare = require('./middleware/koa_reponse_data')
app.use(respDataMiddleWare)
// 绑定端口号
app.listen(8888,function(){
    console.log("server running at:http://127.0.0.1:8888");
})

const WebSocketService = require('./service/web_socket_service')
// 开启服务器的监听
// 
WebSocketService.listen()